<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>  

<!DOCTYPE html>
<html>
	<head>
		 <meta charset="utf-8"/>
	     <meta HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
	     <meta HTTP-EQUIV="expires" CONTENT="0">
	     <meta name="keywords" content=""/>
	     <meta name="description" content=""/>
	     <meta name="apple-touch-fullscreen" content="yes"/>
	     <meta name="format-detection" content="telephone=no"/>
	     <meta name="apple-mobile-web-app-capable" content="yes"/>
	     <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
	     <meta http-equiv="Expires" content="-1"/>
	     <meta http-equiv="pragram" content="no-cache"/>
	     <%@include file="common/common.jsp" %>
		<title>首页</title>
	</head>
	<body>
		
		<input id="type" type="hidden" value="1"/> 
		<!-- 引入头部标签  开始 -->
		<%@include file="common/header.jsp" %>
		<!-- 引入头部标签  结束 -->
				
		<section class="homeCarousel clearfix">
			<div class="carousel">
				<div class="homeCarousel_img" style="left: 0;">
					<a href="#"><img src="${ctx}/image/banner.png" alt="" /></a>
					<a href="#"><img src="${ctx}/image/banner02.png" alt="" /></a>
					<a href="#"><img src="${ctx}/image/banner03.png" alt="" /></a>
					<a href="#"><img src="${ctx}/image/banner04.png" alt="" /></a>
					<a href="#"><img src="${ctx}/image/banner05.png" alt="" /></a>
				</div>
				<div class="dot">
					<span class="on"></span>
					<span></span>
					<span></span>
					<span></span>
					<span></span>
				</div>
			<a href="javascript:;" id="btn_prev"></a>
			<a href="javascript:;" id="btn_next"></a>
					
		</div>
		</section>
		<div class="homeClassify clearfix">
			<%-- <a class="fl" href="${ctx}/consultCommentTest/testComent">拍照测试</a>  --%>
			<%-- <a class="fl" href="${ctx}/consultComment/test">拍照测试</a>  --%>
			
			<c:forEach items="${goodsClassList}" var="goodsClass" varStatus="status">
				<c:if test="${status.index <5}">
					<a class="fl" href="${ctx}/goodsClass/initIndexByGoodsClass?id=${goodsClass.id}&className=${goodsClass.name}">
						<c:choose>
							<c:when test="${goodsClass.icon!=null}">
								<img src="${iconFile}${goodsClass.icon}" alt="${goodsClass.name}" />
							</c:when>
							<c:otherwise>
								<img src="${ctx}/image/wj.png" alt="${goodsClass.name}" />
							</c:otherwise>
						</c:choose>
						<p>${goodsClass.name}</p>
					</a>
				</c:if>
			</c:forEach>
			
			<%-- <a class="fl" href="indexClick.html">
				<img src="${ctx}/image/wj.png" alt="" />
				<p>玩具类</p>
			</a>
			<a class="fl" href="indexClick.html">
				<img src="${ctx}/image/my.png" alt="" />
				<p>母婴用品类</p>
			</a>
			<a class="fl" href="indexClick.html">
				<img src="${ctx}/image/sp1.png" alt="" />
				<p>食品类</p>
			</a>
			<a class="fl" href="indexClick.html">
				<img src="${ctx}/image/yl.png" alt="" />
				<p>原料</p>
			</a>
			<a class="fl" href="indexClick.html">
			<img src="${ctx}/image/fu.png" alt="" />
				<p>服装</p>
			</a> --%>
		</div>
		<%-- 
		<c:forEach items="${resultMapList}" var="resultMap" varStatus="status">
			<c:choose>
				<c:when test="${status.index =='0' }">
					<div class="homeDress clearfix">
						<ol>
							<li class="fl">
								<c:choose>
									<c:when test="${resultMap.classIcon!=null}">
										<img src="${iconFile}${resultMap.classIcon}" alt="${resultMap.name}" />
									</c:when>
									<c:otherwise>
										<img src="image/qiche.png" alt="${resultMap.className}" />
									</c:otherwise>
								</c:choose>
								<span>${resultMap.className}</span>
							</li>
							
						</ol>
						<ul>
							<li class="fl">
								<a href="${ctx}/goods/queryGoodsDetail?id=${resultMap.goods[0].id}"><img src="${ctx }/image/pic1.png" alt="${resultMap.goods[0].name}" /></a>
							</li>
							<li class="fl">
								<c:forEach items="${resultMap.goods}" var="goods" varStatus="statusIndex">
									<c:if test="${statusIndex.index >0 and statusIndex.index <6}">
										<a href="${ctx}/goods/queryGoodsDetail?id=${goods.id}"><img src="${ctx}/image/pic2.png" alt="${goods.name}" /></a>
									</c:if>
								</c:forEach>
							</li>
						</ul>
					</div>
				</c:when>
				<c:when test="${status.index =='1' }">
					<div class="homeDress clearfix">
						<ol>
							<li class="fl">
								<c:choose>
									<c:when test="${resultMap.classIcon!=null}">
										<img src="${iconFile}${resultMap.classIcon}" alt="${resultMap.name}" />
									</c:when>
									<c:otherwise>
										<img src="${ctx}/image/youer.png" alt="${resultMap.className}" />
									</c:otherwise>
								</c:choose>
								<span>${resultMap.className}</span>
							</li>
						</ol>
						<ul>
							<li class="fl">
								<a href="${ctx}/goods/queryGoodsDetail?id=${resultMap.goods[0].id}"><img src="${ctx }/image/pic13.png" alt="${resultMap.goods[0].name}" /></a>
							</li>
							<li class="fl">
								<c:forEach items="${resultMap.goods}" var="goods" varStatus="statusIndex">
									<c:if test="${statusIndex.index >0 and statusIndex.index <6}">
										<a href="${ctx}/goods/queryGoodsDetail?id=${goods.id}">
											<c:choose>	
												<c:when test="${goods.picture!=null}">
													<img src="${baseFile}${goods.picture}" alt="" />
												</c:when>
												<c:otherwise>
													<img src="${ctx}/image/pic03.png" alt="${goods.name}" />
												</c:otherwise>
											</c:choose>
										</a>
									</c:if>
								</c:forEach>
							</li>
						</ul>
					</div>
				</c:when>
				<c:when test="${status.index =='2' }">
					<div class="homeDress clearfix">
						<ol>
							<li class="fl">
								<c:choose>	
									<c:when test="${resultMap.classIcon!=null}">
										<img src="${iconFile}${resultMap.classIcon}" alt="" />
									</c:when>
									<c:otherwise>
										<img src="${ctx}/image/lunchuan.png" alt="${resultMap.className}" />
									</c:otherwise>
								</c:choose>
								<span>${resultMap.className}</span>
							</li>
						</ol>
						<ul>
							<li class="fl">
								<a href="${ctx}/goods/queryGoodsDetail?id=${resultMap.goods[0].id}"><img src="${ctx }/image/pic14.png" alt="${resultMap.goods[0].name}" /></a>
							</li>
							<li class="fl">
								<c:forEach items="${resultMap.goods}" var="goods" varStatus="statusIndex">
									<c:if test="${statusIndex.index >0 and statusIndex.index <6}">
										<a href="${ctx}/goods/queryGoodsDetail?id=${goods.id}">
											<c:choose>	
												<c:when test="${goods.picture!=null}">
													<img src="${baseFile}${goods.picture}" alt="" />
												</c:when>
												<c:otherwise>
													<img src="${ctx}/image/pic10.png" alt="${goods.name}" />
												</c:otherwise>
											</c:choose>
										</a>
									</c:if>
								</c:forEach>
							</li>
						</ul>
					</div>
				</c:when>
				<c:otherwise>
					<input type="hidden" name="name" value="默认显示三大分类包含的商品信息">
				</c:otherwise>
			</c:choose>
		</c:forEach>
		
		 --%>
		<div class="homeGroom">
			<p>
				<img src="${ctx}/image/xx.png" alt="" />
				<span>特别推荐</span>
			</p>
			<p>实时推荐最适合你的宝贝</p>
		</div>
		
		<!-- 特别推荐的商品展示  标签开始 -->
		<ul class="homeGoods clearfix">
			<c:forEach items="${goodsList }" var="goods" varStatus="status">
				<c:if test="${status.index<6 }">
					<c:choose>
						<c:when test="${status.count%2!=0}">
							<li class="fl">
						</c:when>
						<c:otherwise>
							<li class="fr">
						</c:otherwise>
					</c:choose>
						<a href="${ctx}/goods/queryGoodsDetail?id=${goods.id}">
							<c:choose>	
								<c:when test="${goods.picture!=null}">
									<img src="${baseFile}${goods.picture}" alt="" />
								</c:when>
								<c:otherwise>
									<img src="${ctx}/image/pic5.png" alt="" />
								</c:otherwise>
							</c:choose>
							<p class="moreWord">
								<c:choose>
									<c:when test="${fn:length(goods.name)>13}">
										${fn:substring(goods.name,0,14)}...
									</c:when>
									<c:otherwise>
										${goods.name }
									</c:otherwise>
								</c:choose>
							</p>
						</a>
					 	<p>
					 		<c:choose>
					 			<c:when test="${goods.proTitle!=null && goods.proTitle!=''}"><span style="color:#cf2024;font-size:2.2rem;">${goods.proTitle}</span></c:when>
					 			<c:otherwise><span class="spanProTitle">暂无优惠</span></c:otherwise>
					 		</c:choose>
						</p> 
						 <p style="color:#cf2024;font-size:2.2rem;">
							¥ ${goods.marketPrice }
							<span style="color:#333;font-size:14px;float:right;">月销 ${goods.monthSaleMount}笔</span>
						</p>
						<%-- <p class="price">
							<span><b>¥ ${goods.marketPrice}</b></span>
							<span class="r" style="color:#333;font-size:14px;">月销 ${goods.monthSaleMount}笔</span>
							<!-- <a href="javascript:void(0);" class="fr">看相似</a> -->
						</p> --%>
					</li>
				</c:if>
			</c:forEach>
		</ul>
		<!-- 特别推荐的商品展示  标签结束-->
		
		<!-- 引入底部标签  开始 -->
		<%@include file="common/bottom.jsp" %>
		<!-- 引入底部标签  结束 -->
		
<!-- 	<script src="${ctx}/js/shuffle.js"></script> -->
		
	</body>
	
    <script type="text/javascript">
    	/*  $('.searchBox div').click(function(){
		   location.href='search.html'
		}); */
		$(function(){
			$(".spanProTitle").css('opacity','0');
		});
		
		
    </script>
</html>